﻿using System;
using System.Activities;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WFExtended.Framework.DurableInstancing;
using WFExtended.Samples.Activities;

namespace WFExtended.Samples.ConsoleRun
{
    public class InstanceStoreTest : AConsoleRun
    {
        public override void Execute()
        {
            WorkflowApplication instance = new WorkflowApplication(new InstanceStore())
                {
                    PersistableIdle = (e) =>PersistableIdleAction.Persist
                   
                };
           instance.InstanceStore = new XmlInstanceStore(instance.Id);
           instance.Run();

           instance = new WorkflowApplication(new InstanceStore())
           {
               PersistableIdle = (e) => PersistableIdleAction.Persist

           };
           instance.InstanceStore = new MemoryInstanceStore();
           instance.Run();
        }
    }
}
